applicationaccels: Use g_renew()
authorBenjamin Otte <otte@redhat.com>
Fri, 6 Mar 2020 04:06:25 +0000 (05:06 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 6 Mar 2020 04:44:11 +0000 (05:44 +0100)
gtk/gtkapplicationaccels.c

index b4a14b9daa8aefae59d57bf7fb23b46514c14bac..a27501facffbf11179731ed04d6b05ff478a5a22 100644 (file)
@@ -96,8 +96,7 @@ add_entry (GtkApplicationAccels *accels,
   else
     n = 0;
 
-  new = g_new (const gchar *, n + 1 + 1);
-  memcpy (new, old, n * sizeof (const gchar *));
+  new = g_renew (const gchar *, old, n + 1 + 1);
   new[n] = action_and_target;
   new[n + 1] = NULL;